hysop.tools.decorators module

hysop.tools.decorators.debug(f)[source]

Debug decorator Usage: @debug before function definition you want to debug If verbose is set to True: prints filename and line of function definition Else: only print depth of call and function name

hysop.tools.decorators.deprecated(f)[source]
hysop.tools.decorators.optional_property(f)[source]
hysop.tools.decorators.profile(f)[source]

Decorator to enable function profiling of a method inside a class. The concerned class must have a Profiler attribute.

hysop.tools.decorators.required_property(f)[source]
hysop.tools.decorators.requires_cmd(*args)[source]

Raise a RuntimeError if given executable names are not found in system PATH.

hysop.tools.decorators.static_vars(**kwargs)[source]

Attach a static variables local to decorated function.

hysop.tools.decorators.wraps(f)[source]

Like functools.wraps but keep trace of the original wrapped function in the ‘__wrapped__’ attribute. This is usefull to trace functions calls origin. See hysop.tools.decorators.debug